<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<title>科情服务 - 修改任务单</title>
<meta name="description" content="修改任务单">
<meta name="keywords" content="科情服务">
<meta content="width=device-width,initial-scale=1,maximum-scale=1,user-scalable=no" name="viewport">
<link rel="stylesheet" href="${pageContext.request.contextPath}/plugins/bootstrap/css/bootstrap.min.css">
<link rel="stylesheet" href="${pageContext.request.contextPath}/plugins/font-awesome/css/font-awesome.min.css">
<link rel="stylesheet" href="${pageContext.request.contextPath}/plugins/ionicons/css/ionicons.min.css">
<link rel="stylesheet" href="${pageContext.request.contextPath}/plugins/iCheck/square/blue.css">
<link rel="stylesheet" href="${pageContext.request.contextPath}/plugins/morris/morris.css">
<link rel="stylesheet" href="${pageContext.request.contextPath}/plugins/jvectormap/jquery-jvectormap-1.2.2.css">
<link rel="stylesheet" href="${pageContext.request.contextPath}/plugins/datepicker/datepicker3.css">
<link rel="stylesheet" href="${pageContext.request.contextPath}/plugins/daterangepicker/daterangepicker.css">
<link rel="stylesheet" href="${pageContext.request.contextPath}/plugins/bootstrap-wysihtml5/bootstrap3-wysihtml5.min.css">
<link rel="stylesheet" href="${pageContext.request.contextPath}/plugins/datatables/dataTables.bootstrap.css">
<link rel="stylesheet" href="${pageContext.request.contextPath}/plugins/treeTable/jquery.treetable.css">
<link rel="stylesheet" href="${pageContext.request.contextPath}/plugins/treeTable/jquery.treetable.theme.default.css">
<link rel="stylesheet" href="${pageContext.request.contextPath}/plugins/select2/select2.css">
<link rel="stylesheet" href="${pageContext.request.contextPath}/plugins/colorpicker/bootstrap-colorpicker.min.css">
<link rel="stylesheet" href="${pageContext.request.contextPath}/plugins/bootstrap-markdown/css/bootstrap-markdown.min.css">
<link rel="stylesheet" href="${pageContext.request.contextPath}/plugins/adminLTE/css/AdminLTE.css">
<link rel="stylesheet" href="${pageContext.request.contextPath}/plugins/adminLTE/css/skins/_all-skins.min.css">
<link rel="stylesheet" href="${pageContext.request.contextPath}/css/style.css">
<link rel="stylesheet" href="${pageContext.request.contextPath}/plugins/ionslider/ion.rangeSlider.css">
<link rel="stylesheet" href="${pageContext.request.contextPath}/plugins/ionslider/ion.rangeSlider.skinNice.css">
<link rel="stylesheet" href="${pageContext.request.contextPath}/plugins/bootstrap-slider/slider.css">
<link rel="stylesheet" href="${pageContext.request.contextPath}/plugins/bootstrap-datetimepicker/bootstrap-datetimepicker.css">
</head>

<body class="hold-transition skin-purple sidebar-mini">
	<div class="wrapper">
		<!-- 页面头部 -->
		<jsp:include page="header.jsp"></jsp:include>
		<!-- 页面头部 /-->
		<!-- 导航侧栏 -->
		<jsp:include page="aside.jsp"></jsp:include>
		<!-- 导航侧栏 /-->
		<!-- 内容区域 -->
		<div class="content-wrapper">
			<!-- 内容头部 -->
			<section class="content-header">
			<h1>
				数据录入管理 <small>科情服务任务单</small>
			</h1>
			<ol class="breadcrumb">
				<li><a href="${pageContext.request.contextPath}/index.jsp"><i
						class="fa fa-dashboard"></i> 首页</a></li>
				<li><a
					href="${pageContext.request.contextPath}/kqfw/findTask.do">数据录入管理</a></li>
				<li class="active">编辑科情服务任务单</li>
			</ol>
			</section>
			<!-- 内容头部 /-->
			<form action="${pageContext.request.contextPath}/kqfw/updateTask.do" method="post">
				<!-- 正文区域 -->
				<section class="content">
					<div class="panel panel-default">
						<div class="panel-heading">科情服务任务单</div>
						<div class="row data-type">
							<div class="col-md-2 title" style="display: none">ID</div>
							<div class="col-md-10 data" style="display: none">
								<input type="text" class="form-control" name="id" value="${kqfwtask.id}">
							</div>
							<div class="col-md-2 title">编号</div>
							<div class="col-md-10 data">
								<input type="text" class="form-control" name="number" value="${kqfwtask.number}" readonly="readonly">
							</div>

							<div class="col-md-2 title">任务名称</div>
							<div class="col-md-10 data">
								<input type="text" class="form-control" name="taskname" value="${kqfwtask.taskname}">
							</div>

							<div class="col-md-2 title">单位</div>
							<div class="col-md-4 data">
								<input type="text" class="form-control" name="organization" value="${kqfwtask.organization}">
							</div>
							<div class="col-md-2 title">联系人</div>
							<div class="col-md-4 data">
								<input type="text" class="form-control" name="linkman" value="${kqfwtask.linkman}">
							</div>

							<div class="col-md-2 title">联系电话</div>
							<div class="col-md-4 data">
								<input type="text" class="form-control" name="telephone" value="${kqfwtask.telephone}">
							</div>
							<div class="col-md-2 title">下达时间</div>
							<div class="col-md-4 data">
								<div class="input-group date">
									<div class="input-group-addon">
										<i class="fa fa-calendar"></i>
									</div>
									<input type="text" class="form-control pull-right"
										   id="datepicker-a3" name="givetime" value="${kqfwtask.givetimeStr}">
								</div>
							</div>

							<div class="col-md-2 title">完成时限</div>
							<div class="col-md-4 data">
								<input type="text" class="form-control" name="timelimit" value="${kqfwtask.timelimit}">
							</div>

							<div class="col-md-2 title">任务类型</div>
							<div class="col-md-4 data">
								<select class="form-control select2" style="width: 100%"
										name="tasktype">
									<option value="0" <c:if test="${kqfwtask.tasktype==0}">selected</c:if>>资料收集</option>
									<option value="1" <c:if test="${kqfwtask.tasktype==1}">selected</c:if>>科技查新</option>
									<option value="2" <c:if test="${kqfwtask.tasktype==2}">selected</c:if>>前沿动态分析整编</option>
									<option value="3" <c:if test="${kqfwtask.tasktype==3}">selected</c:if>>"信息专员"服务</option>
									<option value="4" <c:if test="${kqfwtask.tasktype==4}">selected</c:if>>团队学术影响力分析</option>
									<option value="5" <c:if test="${kqfwtask.tasktype==5}">selected</c:if>>其他</option>
								</select>
							</div>
							<div class="col-md-2 title">任务状态</div>
							<div class="col-md-4 data">
									<input type="text" class="form-control" name="status" value="${kqfwtask.status}" readonly="readonly">
							</div>
							<div class="col-md-2 title">创建时间</div>
							<div class="col-md-4 data">
								<input type="text" class="form-control" name="timelimit" value="${kqfwtask.create_timeStr}" disabled="disabled">
							</div>
							<div class="col-md-2 title">资料地址</div>
							<div class="col-md-10 data">
								<input type="text" class="form-control" name="means_url" value="${kqfwtask.means_url}">
							</div>
							<div class="col-md-2 title">中英文关键词</div>
							<div class="col-md-10 data">
								<input type="text" class="form-control" name="keywords" value="${kqfwtask.keywords}">
							</div>
							<div class="col-md-2 title rowHeight2x">任务背景</div>
							<div class="col-md-10 data rowHeight2x">
								<textarea class="form-control" rows="3" name="taskbackground">${kqfwtask.taskbackground}</textarea>
							</div>
							<div class="col-md-2 title rowHeight2x">任务简述</div>
							<div class="col-md-10 data rowHeight2x">
								<textarea class="form-control" rows="3" name="taskmark">${kqfwtask.taskmark}</textarea>
							</div>

							<div class="col-md-2 title rowHeight2x">具体要求</div>
							<div class="col-md-10 data rowHeight2x">
								<textarea class="form-control" rows="3" name="specification">${kqfwtask.specification}</textarea>
							</div>
							<div class="col-md-2 title rowHeight6x">任务完成情况</div>
							<div class="col-md-10 data rowHeight6x">
								<textarea class="form-control" rows="3" name="taskInfo">${kqfwtask.taskInfo}</textarea>
								<table class="table table-bordered table-striped table-hover dataTable">
									<thead>
										<tr>
											<th class="text-center">完成人</th>
											<th class="text-center">部职别</th>
											<th class="text-center">任务分工</th>
										</tr>
										<tr>
											<th>
												<a class="btn-default" onclick="addTR()" style="display:block;cursor: pointer;height: 30px;width: 80px;line-height: 30px;text-align: center">新增一项</a>
											</th>
										</tr>
									</thead>
									<tbody class="tb">
									<c:forEach items="${kqfwtask.kqfwPerformance}" var="performance">
										<tr>
											<td style="display: none">
												<input type="text" class="form-control" name="pid" value="${performance.id}" readonly="readonly">
											</td>
											<td>
												<input type="text" class="form-control" name="person_in_charge" value="${performance.person_in_charge}">
											</td>
											<td>
												<input type="text" class="form-control" name="level" value="${performance.level}">
											</td>
											<td>
												<input type="text" class="form-control" name="task_allocation" value="${performance.task_allocation}">
											</td>
											<td class="text-center">
												<a class="btn-default" onclick="deleteTR(this,${performance.id})"><i class="fa fa-trash fa-2x" aria-hidden="true"></i> </a>
											</td>
										</tr>
									</c:forEach>
									</tbody>
								</table>
							</div>
							<div class="col-md-2 title rowHeight2x">任务反馈</div>
							<div class="col-md-10 data rowHeight2x">
								<textarea class="form-control" rows="3" name="taskfeedback">${kqfwtask.taskfeedback}</textarea>
							</div>

						</div>
						</div>
					<!--工具栏-->
					<div class="box-tools text-center">
						<button type="submit" class="btn bg-maroon">修改</button>
						<button type="button" class="btn bg-default" onclick="history.back(-1);">返回</button>
					</div>
					<!--工具栏/-->
				</section>
				<!-- 正文区域 /-->
			</form>
		</div>
		<!-- 内容区域 /-->
		<!-- 底部导航 -->
		<jsp:include page="footer.jsp"></jsp:include>
		<!-- 底部导航 /-->
	</div>

	<script src="${pageContext.request.contextPath}/plugins/jQuery/jquery-2.2.3.min.js"></script>
	<script src="${pageContext.request.contextPath}/plugins/jQueryUI/jquery-ui.min.js"></script>
	<script>
		$.widget.bridge('uibutton', $.ui.button);
	</script>
	<script src="${pageContext.request.contextPath}/plugins/bootstrap/js/bootstrap.min.js"></script>
	<script src="${pageContext.request.contextPath}/plugins/raphael/raphael-min.js"></script>
	<script src="${pageContext.request.contextPath}/plugins/morris/morris.min.js"></script>
	<script src="${pageContext.request.contextPath}/plugins/sparkline/jquery.sparkline.min.js"></script>
	<script src="${pageContext.request.contextPath}/plugins/jvectormap/jquery-jvectormap-1.2.2.min.js"></script>
	<script src="${pageContext.request.contextPath}/plugins/jvectormap/jquery-jvectormap-world-mill-en.js"></script>
	<script src="${pageContext.request.contextPath}/plugins/knob/jquery.knob.js"></script>
	<script src="${pageContext.request.contextPath}/plugins/daterangepicker/moment.min.js"></script>
	<script src="${pageContext.request.contextPath}/plugins/daterangepicker/daterangepicker.js"></script>
	<script src="${pageContext.request.contextPath}/plugins/daterangepicker/daterangepicker.zh-CN.js"></script>
	<script src="${pageContext.request.contextPath}/plugins/datepicker/bootstrap-datepicker.js"></script>
	<script src="${pageContext.request.contextPath}/plugins/datepicker/locales/bootstrap-datepicker.zh-CN.js"></script>
	<script src="${pageContext.request.contextPath}/plugins/bootstrap-wysihtml5/bootstrap3-wysihtml5.all.min.js"></script>
	<script src="${pageContext.request.contextPath}/plugins/slimScroll/jquery.slimscroll.min.js"></script>
	<script src="${pageContext.request.contextPath}/plugins/fastclick/fastclick.js"></script>
	<script src="${pageContext.request.contextPath}/plugins/iCheck/icheck.min.js"></script>
	<script src="${pageContext.request.contextPath}/plugins/adminLTE/js/app.min.js"></script>
	<script src="${pageContext.request.contextPath}/plugins/treeTable/jquery.treetable.js"></script>
	<script src="${pageContext.request.contextPath}/plugins/select2/select2.full.min.js"></script>
	<script src="${pageContext.request.contextPath}/plugins/colorpicker/bootstrap-colorpicker.min.js"></script>
	<script src="${pageContext.request.contextPath}/plugins/bootstrap-wysihtml5/bootstrap-wysihtml5.zh-CN.js"></script>
	<script src="${pageContext.request.contextPath}/plugins/bootstrap-markdown/js/bootstrap-markdown.js"></script>
	<script src="${pageContext.request.contextPath}/plugins/bootstrap-markdown/locale/bootstrap-markdown.zh.js"></script>
	<script src="${pageContext.request.contextPath}/plugins/bootstrap-markdown/js/markdown.js"></script>
	<script src="${pageContext.request.contextPath}/plugins/bootstrap-markdown/js/to-markdown.js"></script>
	<script src="${pageContext.request.contextPath}/plugins/ckeditor/ckeditor.js"></script>
	<script src="${pageContext.request.contextPath}/plugins/input-mask/jquery.inputmask.js"></script>
	<script src="${pageContext.request.contextPath}/plugins/input-mask/jquery.inputmask.date.extensions.js"></script>
	<script src="${pageContext.request.contextPath}/plugins/input-mask/jquery.inputmask.extensions.js"></script>
	<script src="${pageContext.request.contextPath}/plugins/datatables/jquery.dataTables.min.js"></script>
	<script src="${pageContext.request.contextPath}/plugins/datatables/dataTables.bootstrap.min.js"></script>
	<script src="${pageContext.request.contextPath}/plugins/chartjs/Chart.min.js"></script>
	<script src="${pageContext.request.contextPath}/plugins/flot/jquery.flot.min.js"></script>
	<script src="${pageContext.request.contextPath}/plugins/flot/jquery.flot.resize.min.js"></script>
	<script src="${pageContext.request.contextPath}/plugins/flot/jquery.flot.pie.min.js"></script>
	<script src="${pageContext.request.contextPath}/plugins/flot/jquery.flot.categories.min.js"></script>
	<script src="${pageContext.request.contextPath}/plugins/ionslider/ion.rangeSlider.min.js"></script>
	<script src="${pageContext.request.contextPath}/plugins/bootstrap-slider/bootstrap-slider.js"></script>
	<script src="${pageContext.request.contextPath}/plugins/bootstrap-datetimepicker/bootstrap-datetimepicker.min.js"></script>

	<script>
		//设置新增列表选项
		function addTR(obj){
			var objTR = $(".tb");
			objTR.append("<tr><td style='display: none'><input type='text' class='form-control' name='pid' value='0' readonly='readonly'></td><td><input type='text' class='form-control' name='person_in_charge'></td><td><input type='text' class='form-control' name='level'></td><td><input type='text' class='form-control' name='task_allocation'></td><td class='text-center'><a class='btn-default' onclick='deleteTR(this)'><i class='fa fa-trash fa-2x' aria-hidden='true'></i> </a></td></tr>")
		}

		//删除列表项目
		function deleteTR(ts,id){
				if (id==null || id==undefined){
					$(ts).parent().parent().remove();
				}else {
					$.get("${pageContext.request.contextPath}/api/deletePerformanceById",{"id":id},function (data){
						if (data.code==1 || data.code==2){
							$(ts).parent().parent().remove();
						}else{
							alert("删除失败！");
						}

					},"json")
				}
		}

	</script>


</body>

</html>